package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class AmendBulletin {

    private static String amendBulletin ="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<amendBulletin> \n" +
            "    <amendBulletinCode>{0}</amendBulletinCode>\n" +
            "    <amendBulletinName>{1}</amendBulletinName>\n" +
            "    <originalBulletinType>{2}</originalBulletinType>\n" +
            "    <originalBulletinCode>{3}</originalBulletinCode>\n" +
            "    <tenderProjectCode>{4}</tenderProjectCode>\n" +
            "    <bidSectionCodes>{5}</bidSectionCodes>\n" +
            "    <amendContent>{6}</amendContent>\n" +
            "    <amendBulletinIssueTime>{7}</amendBulletinIssueTime>\n" +
            "    <amendBidDocReferEndTime>{8}</amendBidDocReferEndTime>\n" +
            "    <URL>{9}</URL>\n" +
            "    <version>{10}</version>\n" +
            "    <attachmentCode>{11}</attachmentCode>\n" +
            "    <openType>{12}</openType>\n" +
            "    <examinerName>{13}</examinerName>\n" +
            "    <examinerCodeType>{14}</examinerCodeType>\n" +
            "    <examinerCode>{15}</examinerCode>\n" +
            "    <verifyTime>{16}</verifyTime>\n" +
            "</amendBulletin>";

    public static void setAmendBulletin(String amendBulletin,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16) {
        AmendBulletin.amendBulletin = MessageFormat.format(amendBulletin,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16);
    }
    public static void setAmendBulletin(){
        setAmendBulletin(AmendBulletin.amendBulletin, ParameterUtils.get("amendBulletinCode"),
                ParameterUtils.get("amendBulletinName"),
                ParameterUtils.get("originalBulletinType"),
                ParameterUtils.get("originalBulletinCode"),
                ParameterUtils.get("tenderProjectCode"),
                ParameterUtils.get("bidSectionCodes"),
                ParameterUtils.get("amendContent"),
                ParameterUtils.get("amendBulletinIssueTime"),
                ParameterUtils.get("amendBidDocReferEndTime"),
                ParameterUtils.get("URL"),
                ParameterUtils.get("version"),
                ParameterUtils.get("attachmentCode"),
                ParameterUtils.get("examinerName"),
                ParameterUtils.get("openType"),
                ParameterUtils.get("examinerName"),
                ParameterUtils.get("examinerCodeType"),
                ParameterUtils.get("verifyTime")
        );
    }

//    public static void main(String[] args) {
//        setAmendBulletin();
//        System.out.println(amendBulletin);
//    }


}
